package com.example.mybatisplus.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.example.mybatisplus.model.domain.AdminInfo;
import com.example.mybatisplus.mapper.AdminInfoMapper;
import com.example.mybatisplus.service.AdminInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * <p>
 * ����Ա��Ϣ�� 服务实现类
 * </p>
 *
 * @author lxp
 * @since 2023-10-16
 */
@Mapper
@Service
public class AdminInfoServiceImpl extends ServiceImpl<AdminInfoMapper, AdminInfo> implements AdminInfoService {
    @Autowired
    private AdminInfoMapper adminMapper;

    @Override
    public List<AdminInfo> getAllUsers() {
        List<AdminInfo> s=adminMapper.getAllUsers();
        return  s;
    }

    @Override
    public List<AdminInfo> findAdminByPageAndLimit(Integer page,Integer limit) {
        List <AdminInfo> s=adminMapper.findAdminByPageAndLimit(page,limit);
        return  s;
    }

    @Override
    public  Integer addAdmins(AdminInfo admin) {
        Integer  s=adminMapper.addAdmins(admin);
        return  s;
    }


    @Override
    public Integer deleteAdminById(AdminInfo adminId) {
        Integer s=adminMapper.deleteAdminById(adminId);
        return s;
    }

    @Override
    public Integer updateAdminById(AdminInfo admin) {
        Integer s=adminMapper.updateAdminById(admin);
        return s;
    }

    @Override
    public Integer deleteAdmins(String[] ids) {
        Integer s=adminMapper.deleteAdmins(ids);
        return s;
    }

    @Override
    public List<AdminInfo> getAdminInfoByPhone(String admin_phone) {
       List s=adminMapper.getAdminInfoByPhone(admin_phone);
       return  s;
    }

    @Override
    public List<AdminInfo> findAdminByName(String adminName) {
        List s=adminMapper.findAdminByName(adminName);
        return  s;
    }

    @Override
    public AdminInfo AdminLogin(String adminPhone, String adminPassword) {
        AdminInfo s=adminMapper.AdminLogin(adminPhone,adminPassword);
        return  s;
    }


}
